#include<iostream>
using namespace std;

int main(){
    int n,x,tmp;
    cin>>n;
    
    while(n--){s
       cin>>x;
       int a =1,b=1;
       while(x--){
           tmp=a;
           a=b;
           b=tmp+b;
       }
       cout<<tmp<<endl;
    }
}
